<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <title>产品展示</title>
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <link rel="stylesheet" href="../../component/elementUI/index.css" />
  <link rel="stylesheet" href="../../style/wangeditor.css" />
  <link rel="stylesheet" href="../../style/index.css" />
  <style>
    .el-badge__content {
      z-index: 1;
    }

    .el-dialog__header {
      padding: 15px 15px 10px;
    }

    .el-dialog__body {
      padding: 15px;
    }

    .el-dialog__footer {
      padding: 5px 15px 10px;
    }

    #user .el-dialog {
      margin-top: 10px !important;
      margin: 0 auto 10px;
    }

    #user .el-dialog__header {
      padding: 15px 15px 0;
    }

    #user .el-dialog__body {
      padding: 0 15px 0;
    }

    #user .el-input.is-disabled .el-input__inner {
      color: #000;
      background-color: #fff;
    }

    .el-dropdown {
      vertical-align: top;
    }

    .el-dropdown+.el-dropdown {
      margin-left: 15px;
    }

    .el-icon-arrow-down {
      font-size: 12px;
    }
  </style>
</head>

<body>
  <div id="app" v-cloak class="minWidth">
    <div style="display: flex; align-items: flex-start">
      <div style="float: left; height: 100%; margin-right: 2%">
        <!-- <el-autocomplete style="margin-bottom: 10%; width: 100%" v-model="state" :fetch-suggestions="querySearchAsync"
          placeholder="请输入内容" @select="handleSelect"></el-autocomplete> -->
        <el-tree :data="three" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
      </div>
      <div style="float: right; width: 85%">
        <el-form :inline="true" :form="form">
          <el-form-item>
            <el-input v-model.trim="form.Article_Name" clearable placeholder="请输入商品名称" />
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="onSerach">查询</el-button>
          </el-form-item>
          <!-- <el-form-item>
            <el-button type="success" @click="shensub">提交</el-button>
          </el-form-item> -->
        </el-form>
        <el-table v-loading="loading" :data="tableData" stripe border :selectable="selectable"
          height="calc(100vh - 120px)" style="width: 100%" @selection-change="handleSelectionChange">
          <el-table-column type="selection" width="55"> </el-table-column>
          <!-- <el-table-column
              align="center"
              type="index"
              label="序号"
              width="50"
            ></el-table-column> -->
          <el-table-column prop="Article_SerialNumber" label="商品编号"></el-table-column>
          <el-table-column prop="Article_Specifications_SerialNumber" label="商品规格编号"></el-table-column>

          <el-table-column prop="Picture_URL" width="140" align="center" label="商品规格图">
            <template v-slot="{row}">
              <el-image fit="contain" :src="IMGlj + row.Picture_URL" :preview-src-list="[IMGlj + row.Picture_URL]"
                style="width: 100px; height: 100px"></el-image>
            </template>
          </el-table-column>
          <el-table-column prop="Specifications_Name" label="商品规格名称"></el-table-column>
          <el-table-column prop="Unit_Price" label="SKU单价">
            <template slot-scope="scope">
              {{ scope.row.Unit_Price + '/' + '元' }}
              <!-- 假设单位是“件”，可按需修改 -->
            </template></el-table-column>
          <el-table-column prop="SKU_Quantity" label="包装中件数">
            <template slot-scope="scope">
              {{ scope.row.SKU_Quantity + '/' + scope.row.Size }}
              <!-- 假设单位是“件”，可按需修改 -->
            </template></el-table-column>
          <el-table-column prop="Start_number" label="起批量"><template slot-scope="scope">
              {{ scope.row.Start_number + '/' + scope.row.Size }}
              <!-- 假设单位是“件”，可按需修改 -->
            </template>
          </el-table-column>
          <el-table-column prop="Row_Status" label="审核状态" width="100"
            :filters="[{ text: '未审核', value: '0' }, { text: '已审核', value: '01' },{ text: '已拒绝', value: '88' },{ text: '已上架', value: '1' }]"
            :filter-method="filterTag" filter-placement="bottom-end">
            <template slot-scope="scope">
              <el-tag :type="scope.row.Row_Status === '01' ? 'success' : 
        scope.row.Row_Status === '88' ? 'danger' : 
        scope.row.Row_Status === '1' ? 'warning' : 'info'" disable-transitions>
                {{ scope.row.Row_Status === "0" ? '未审核' :
                scope.row.Row_Status === "88" ? '已拒绝' :
                scope.row.Row_Status === "01" ? '已审核' :'已上架' }}
              </el-tag>
            </template>
          </el-table-column>
          <el-table-column label="操作" width="240">
            <template slot-scope="scope">
              <el-button size="mini" type="success" @click="xiugai(scope.row)">编辑</el-button>
              <el-dropdown trigger="click" @command="handleCommand">
                <el-button size="mini" type="primary" @click="showAuditDropdown(scope.row)">
                  审核<i class="el-icon-arrow-down el-icon--right"></i>
                </el-button>
                <el-dropdown-menu slot="dropdown">
                  <el-dropdown-item command="a" :disabled="isButtonEnabled1(scope.row)">通过</el-dropdown-item>
                  <el-dropdown-item command="c" :disabled="isButtonEnabled2(scope.row)">上架</el-dropdown-item>
                  <el-dropdown-item command="b" :disabled="isButtonEnabled(scope.row)">不通过</el-dropdown-item>
                  <el-dropdown-item command="d">重新审核</el-dropdown-item>
                </el-dropdown-menu>
              </el-dropdown>

              <!-- <el-button size="mini" type="danger" @click="shanchu(scope.row)"
                  >不通过</el-button
                > -->
              <!-- <el-button
                  size="mini"
                  @click="ybsahng(scope.$index, scope.row)"
                  :disabled="isButtonEnabled(scope.row)"
                  >审核商品</el-button
                > -->
            </template>
          </el-table-column>
        </el-table>
        <el-pagination style="margin-top: 5px" background @size-change="handleSizeChange"
      @current-change="handleCurrentChange" :current-page="form.page" :page-sizes="[10, 20, 30, 50]"
      :page-size="form.limit" layout="total, sizes, prev, pager, next, jumper" :total="total">
    </el-pagination>
        <!-- <el-pagination
            style="margin-top: 5px"
            background
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="form.page"
            :page-sizes="[10, 20, 30, 50]"
            :page-size="form.limit"
            layout="total, sizes, prev, pager, next, jumper"
            :total="total"
          >
          </el-pagination> -->
        <show-detail :visible.sync="dialogVisible" :data="Article_SerialNumber"></show-detail>
      </div>
    </div>
  </div>
  <script type="text/javascript" src="../../utils/wangeditor.js"></script>
  <script type="text/javascript" src="../../utils/jquery.min.js"></script>
  <script type="text/javascript" src="../../utils/jquery.cookie.js"></script>
  <script type="text/javascript" src="../../utils/vue.min.js"></script>
  <script type="text/javascript" src="../../utils/vuex.min.js"></script>
  <script type="text/javascript" src="../../component/elementUI/index.js"></script>
  <script type="text/javascript" src="../../component/component.js"></script>
  <script type="text/javascript" src="../../config/config.js"></script>
  <script type="text/javascript" src="../../utils/FileSaver.min.js"></script>
  <script type="text/javascript" src="../../utils/FileSaver.js"></script>
  <script type="text/javascript" src="../../utils/xlsx.full.min.js"></script>
  <script type="text/javascript" src="../../utils/xlsx.core.min.js"></script>
  <script type="text/javascript" src="../../utils/compressor.js"></script>
  <script type="text/javascript" src="../../utils/ID_Validity.js"></script>
  <script type="text/javascript" src="../../utils/utils.js"></script>
  <script type="text/javascript" src="./index.js"></script>
</body>

</html>